Set Up WSL From Zero

Table of Contents

Install WSL

wsl --install Debian
wsl

Set up mirror source

sudo mv ~/../../etc/apt/sources.list ~/../../etc/apt/sources.list.backup

sudo nano ~/../../etc/apt/sources.list

change the content if you are in China and have no vpn.

deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
sudo apt update -y
sudo apt install apt-transport-https ca-certificates
sudo nano /etc/apt/sources.list

Change all the http:// to https:// in the /etc/apt/sources.list

sudo apt update
sudo apt install wget curl git ssh
git config --global user.email "<your email>"
git config --global user.name "<your name>"
sudo apt upgrade